﻿using System;
using Microsoft.SharePoint.WebControls;
using Kiiro.SiteDefinition.Core;

namespace Kiiro.SiteDefinition.ControlTemplates
{
    public class KiiroSaveButton : SaveButton
    {
        public BasePage Host
        {
            get { return ( BasePage ) Page; }
        }
        
        protected override bool SaveItem ( )
        {
            bool success = false;

            if ( Page is BasePage )
                Host.Save ( );
            else
                success = base.SaveItem ( );

            return success;
        }
    }
}

/*************************************************************************
 * 
 * $Log: /Internal Projects/Kiiro/Kiiro.SiteDefinition/12/TEMPLATE/CONTROLTEMPLATES/Kiiro/KiiroSaveButton.cs $
 * 
 * 10    1/11/10 11:51a Camerons
 * 
 * 9     12/16/09 5:36p Camerons
 * 
 * 8     30/09/09 1:08p Camerons
 * Implementing UserModel.GetOrCreateUser(). 
 * 
 * 7     28/09/09 3:38p Camerons
 * 
 * 6     17/08/09 11:07a Camerons
 * Added check-in comments section
 * 
 ************************************************************************/